package reader;

import domain.Receipt;
import javafx.fxml.FXML;
import javafx.scene.control.TextField;


public class ReceiptPrinter extends TextField {

    private Receipt detail;
    private TextField receipt;

    public ReceiptPrinter(Receipt detail){
        super();
    }

    public void print(String arg) {
        detail = new Receipt(arg); //创建receipt实例
        receipt = new ReceiptPrinter(detail);
        receipt.setText(arg);
        this.setEditable(false);
    }

    public void print(Receipt detail){
       this.setText(detail.getDetail());
    }


}
